package com.hao.eduservice.controller;

import com.hao.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author chenwenhao
 * @version 1.0.0
 * @ClassName EduLoginController.java
 * @Description TODO
 * @createTime 2020/11/26,20:21
 *  @CrossOrigin: 允许跨域请求
 */
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
public class EduLoginController {

    /**
     * 登录
     *
     * @return {@link R}
     */
    @PostMapping("login")
    public R login(){

        return R.ok().data("token","admin");
    }

    /**
     * 信息
     *
     * @return {@link R}
     */
    @GetMapping("info")
    public R info(){

        return R.ok().data("roles","admin").data("name","kiana")
                .data("avatar","");
    }

}
